<div class="main">
    <div class="leftcolumn">
            <div class="procategories">
                <h2 class="tleprocategories"><span><?php echo $cate['name'] ?></span></h2>
                <ul>
                    <?php foreach ($product as $key => $value): ?>
                        <li>
                            <a href="<?= Yii::app()->baseUrl ?>/san-pham/<?= $value['slug'] ?>.html">
                                <img alt="<?= $value['name'] ?>" src="<?= Yii::app()->baseUrl ?>/timthumb.php?src=<?= Yii::app()->baseUrl ?>/data/cover/<?= $value['cover_image'] ?>&h=122&w=162"/>
                                <h2><?= $value['name'] ?></h2>
                            </a>
                        </li>
                    <?php endforeach; 
                        if(count($parents) > 0):?>
                        <?php foreach ($parents as $key => $value): ?>
                        <li>
                            <a href="<?= Yii::app()->baseUrl ?>/san-pham/<?= $value['slug'] ?>.html">
                                <img alt="<?= $value['name'] ?>" src="<?= Yii::app()->baseUrl ?>/timthumb.php?src=<?= Yii::app()->baseUrl ?>/data/cover/<?= $value['cover_image'] ?>&h=122&w=162"/>
                                <h2><?= $value['name'] ?></h2>
                            </a>
                        </li>
                    <?php endforeach; endif;?>
                </ul>  
            </div>
        <?php
        if (isset($page) && $page == true):
            ?>
            <div class="navi">
                <?php
                $this->widget('CLinkPager', array(
                    'pages' => $pages,
                    'header' => '',
                    'htmlOptions' => array('id' => 'page'),
                    'prevPageLabel' => '&lt; Trang trước',
                    'nextPageLabel' => 'Trang sau &gt;',
                    'firstPageLabel' => '&lt;&lt; Trang đầu',
                    'lastPageLabel' => 'Trang cuối &gt;&gt;',
                    //'pageSize' => '2',
                    'maxButtonCount' => '5',
                    'selectedPageCssClass' => 'current',
                    //'viewPath' => 'san-pham',
                    'createPageUrl' => ''
                ));
                ?>
            </div>
        <?php endif;
        ?>
    </div>
    <?php $this->widget('SidebarWidget'); ?>
</div>
